{extend name="public/base"/}
{block name="body"}
<div class="main-box no-header clearfix">
	<header class="main-box-header clearfix">
		<div class="pull-left">
			<h2>{$meta_title}</h2>
		</div>
		<div class="pull-right">
			<!-- <a href="{:url('add')}" class="btn btn-primary pull-right"> <i class="fa fa-plus-circle fa-lg"></i> 新增</a> -->
		</div>
	</header>
	<div class="main-box-body clearfix">
		<div class="row">
			<form method="get">
				<div class="col-sm-12 col-md-4 col-lg-2">
					<input type="text" class="form-control" name="out_trade_no" value="{$Think.get.out_trade_no}" placeholder="订单号">
				</div>
				<div class="col-sm-12 col-md-4 col-lg-2">
					<input type="text" class="form-control" name="wxname" value="{$Think.get.wxname}" placeholder="请输入微信名">
				</div>

				<div class="col-sm-12 col-md-4 col-lg-2">
					<input type="text" class="form-control" name="start" value="{$Think.get.start}" placeholder="开始时间">
				</div>
				<div class="col-sm-12 col-md-4 col-lg-2">
					<input type="text" class="form-control" name="end" value="{$Think.get.end}" placeholder="结束时间">
				</div>

				<br />
				<div class="col-sm-12 col-md-4 col-lg-12" style="    text-align: right;    margin-top: 10px;">
					<button class="btn btn-primary" type="submit">搜索</button>
				</div>
			</form>
		</div>


		<div class="table-responsive">
      <table class="table table-striped table-hover">
        <thead>
          <tr>
            <th width="30"><input class="checkbox check-all" type="checkbox"></th>
            <th width="60">ID</th>
            <th>操作员</th>
            <th>补退金额</th>
            <th>补退订单号</th>
            <th>补退的客户名字</th>
						<th>备注</th>
            <th>返还时间</th>
          </tr>
        </thead>
        <tbody>
          {volist name="list" id="item"}
          <tr>
            <td><input class="ids row-selected" type="checkbox" name="ids[]" value="{$item['id']}"></td>
						<td>{$item['id']}</td>
            <td></td>
            <td>{$item['money']} </td>
            <td>{$item['out_trade_no']}</td>
            <td>{$item['out_trade_no']|get_table_field="out_trade_no","user_name","order"} </td>
						<td>{$item['rdec']} </td>
						<td>{$item['create_time']}</td>


          </tr>
          {/volist}
        </tbody>
      </table>
			{$list->render()}
		</div>
	</div>
</div>


<!-- datepicker statr -->
<link href="__PUBLIC__/plugs/datepicker/css/foundation-datepicker.min.css" rel="stylesheet" type="text/css">
<script src="__PUBLIC__/plugs/datepicker/js/foundation-datepicker.js"></script>
<script src="__PUBLIC__/plugs/datepicker/js/foundation-datepicker.zh-CN.js"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/plugs/board/board.min.css">
<!-- datepicker end -->
<script type="text/javascript">
		$('[name="start"]').fdatepicker({
			format: 'yyyy-mm-dd hh:ii',
			pickTime: true
		});
		$('[name="end"]').fdatepicker({
			format: 'yyyy-mm-dd hh:ii',
			pickTime: true
		});

		// implementation of disabled form fields
		// var nowTemp = new Date();
		// var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0);
		// var checkin = $('[name="start"]').fdatepicker({
		// 	format: 'yyyy-mm-dd',
		// }).on('changeDate', function (ev) {
		// 	if (ev.date.valueOf() > checkout.date.valueOf()) {
		// 		var newDate = new Date(ev.date)
		// 		newDate.setDate(newDate.getDate() + 1);
		// 		checkout.update(newDate);
		// 	}
		// 	checkin.hide();
		// 	$('[name="end"]')[0].focus();
		// }).data('datepicker');
		// var checkout = $('[name="end"]').fdatepicker({
		// 	format: 'yyyy-mm-dd',
		// 	onRender: function (date) {
		// 		return date.valueOf() <= checkin.date.valueOf() ? 'disabled' : '';
		// 	}
		// }).on('changeDate', function (ev) {
		// 	checkout.hide();
		// }).data('datepicker');

</script>


{/block}
